<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

<body> 
	<f:loadBundle basename="resources" var="msg" />
	<ui:composition template="/templates/template.xhtml">
			<ui:define name="pageTitle">Convertir Moneda</ui:define>
			<ui:define name="pageHeader">CONVERTIR MONEDA</ui:define>
			#{convertirMonedaBean.llenarcombobox()}
			<ui:define name="cuerpo">
				<form jsfc="h:form" id="convertirMoneda">
				<center>
					<h:panelGrid columns="2">
						<h:outputText value="Valor :" />
						<h:inputText id="valor" value="#{convertirMonedaBean.valor}" />
						
						<h:outputText value="Moneda :" />
						<h:selectOneMenu id="listaMonedas" value="#{convertirMonedaBean.idMoneda}">
							<f:selectItems value="#{convertirMonedaBean.listaMonedasNombre}"></f:selectItems> 
						</h:selectOneMenu>
						
						<h:outputText value="Total :" />
						<h:inputText id="total" value="#{convertirMonedaBean.total }" />
					</h:panelGrid>
					<h:panelGrid columns="1">
						<h:commandButton value="Calcular" action="#{convertirMonedaBean.calcularTotal()}" />
					</h:panelGrid>
					</center>
				</form>
			</ui:define>
	</ui:composition>
</body> 
</html>
